#
# Python test scanner plugin

from sys import argv, exit

def scanfile(infile):
	f = open(infile, "r")
	lineNumber = 0;
	for line in f:
		lineNumber += 1
		if "todo" in line.lower():
			print "%s|%d" % (infile, lineNumber)

if __name__ == "__main__":
	if "--name" in argv:
		print "todo"
		exit(0)
	if "--explain" in argv:
		print '''Will report any line of code with the word "todo" in it (case insensitive).'''
		exit(0)
	if "--lc" in argv:
		exit(0) # don't need any configuration!
	if "--inputFile" in argv:
		infile = argv[argv.index("--inputFile") + 1]
		scanfile(infile)
